#include <stdio.h>
#include <stdlib.h>
#include <math.h>

int main ()
{
	for(;;){
	double a, b, c, d, x1, x2, x;
	
	printf("Kvadratnoe yravnenie ax^2+bx+c=0.  Vvedite 4erez probel koefficienti a, b, c : ");
	scanf("%lg %lg %lg", &a, &b, &c);

	if (a==0)
	{
		if( b == 0 )
		{
			if( c == 0 )
				{
					printf("Beskonechno mnogo reshenii \n"); 
					system ("PAUSE");return 0;
				}
			else
			{	
				printf("Net reshenii"); 
				system ("PAUSE");return 0;
			}
		}
		else
		{	printf ("Yravnenie ne cvadratnoe %0.5lg\n",x=-c/b); 
			system ("PAUSE");return 0;
		}
	}
	b=b/a;
	c=c/a;
	d = b*b - 4*c;
	if ( d == 0 )
	{	
		x1 = x2 = -b/2;
		printf("Korni parnie: x1=x2=%0.5lg \n", x1 );	
	}

	if ( d > 0)
	{	
		if (b>0)
			x1 = (-b-sqrt(d))/2; 
		else
			x1 = (-b+sqrt(d))/2; 
		x2 = c/x1; 
		printf("Korni: x1=%lg   x2=%lg \n", x1, x2 );	
	}

	if (d<0)
		printf("Kornei yravneniya net! \n");

	system ("PAUSE");
	system ("CLS");
	}
	return 0;
	
}